@import (reference) './_vars.less';
@import (reference) './_mixin.less';

.aside {
    position: relative;
    width: @size-aside-width;
    height: 100%;
    background-color: @color-aside;
    background-color: var(--color-aside);
    .animation(fade-in-down 0.6s 0.3s both);

    &:before {
        position: absolute;
        top: 0;
        right: 0;
        content: '';
        font-size: 0;
        line-height: 0;
        width: 1px;
        height: 100%;
        background-color: @color-border;
        background-color: var(--color-border);
    }
    &.mobile-open .aside-inner {
        .animation(aside-fade-in-right 0.6s both);
    }
    &.mobile-close .aside-inner {
        .animation(aside-fade-in-left 0.6s both);
    }
}
.aside-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}
.aside-mask {
    display: none;
}

@search-height: 36px;
@search-submit-width: 34px;
.search-form {
    position: relative;
    margin: 40px auto;
    width: 180px;
    color: @color-muted;
    color: var(--color-muted);
}
.search-form-input {
    display: block;
    width: 100%;
    height: @search-height;
    padding: 8px 10px 8px @search-submit-width;
    color: @color-muted;
    color: var(--color-muted);
    border: 1px solid @color-border;
    border: 1px solid var(--color-border);
    background-color: @color-bg;
    background-color: var(--color-bg);
    border-radius: 6px;
    box-sizing: border-box;
    -webkit-appearance: none;

    &:focus {
        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px var(--color-border);
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px var(--color-border);
    }
}
.search-form-submit {
    position: absolute;
    top: 0;
    left: 0;
    width: @search-submit-width;
    height: @search-height;
    color: @color-muted;
    color: var(--color-muted);
    text-align: center;
    background-color: transparent;
    border: none;
}

.author-meta {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    color: @color-primary;
    color: var(--color-primary);
    text-align: center;
    line-height: 30px;
    .transform(translateY(-50%));
}
.author-avatar {
    padding-bottom: 36px;

    a {
        display: block;
    }
    img {
        margin: 0 auto;
        display: block;
        width: 140px;
        height: 140px;
        border-radius: 100%;
        -webkit-transition: transform 0.2s ease;
        -o-transition: transform 0.2s ease;
        transition: transform 0.2s ease;

        &:hover {
            -webkit-transform: scale(1.1);
            -ms-transform: scale(1.1);
            -o-transform: scale(1.1);
            transform: scale(1.1);
        }
    }
}
.author-name {
    font-size: 24px;
}
.author-work {
    font-size: 16px;
}
.author-location {
    color: @color-muted;
    color: var(--color-muted);
    font-size: 14px;
}

.author-thread-wrap {
    margin-top: 20px;
}
.author-threads {
    font-size: 38px;

    svg {
        width: 38px;
        height: 38px;
        fill: currentColor;
    }
}
.thread-item {
    display: inline-block;
    margin: 0 18px;
    color: @color-muted;
    color: var(--color-muted);
    .transition(color 0.3s ease);

    &:hover {
        color: @color-primary;
        color: var(--color-primary);
    }
}


@media screen and (max-height: 588px) {
    .author-meta {
        position: none;
        position: static;
        .transform(none);
    }
}
@media screen and (max-width: @size-mobile-screen-width) {
    .aside {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 90;
        width: 100%;
        background-color: transparent;
        .animation(fade-in 0.6s both);

        &.panel-show {
            display: block;
        }
    }
    .aside-inner {
        width: 80%;
        min-width: 250px;
        max-width: 360px;
        background-color: @color-bg;
        background-color: var(--color-bg);
    }
    .aside-mask {
        position: absolute;
        top: 0;
        left: 0;
        display: block;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
    }
}


.keyframes(aside-fade-in-left, {
    from {
        // opacity: 1;
        .transform(none);
    }
    to {
        // opacity: 0;
        .transform(translate3d(-100%, 0, 0));
    }
});
.keyframes(aside-fade-in-right, {
    from {
        opacity: 0;
        .transform(translate3d(-100%, 0, 0));
    }
    to {
        opacity: 1;
        .transform(none);
    }
});
